﻿/// <reference path="../app.ts" />
/// <reference path='../../typings/angularjs/angular.d.ts'/>
/// <reference path='../../typings/angularjs/angular-resource.d.ts'/>

interface ILogFactory {
    log: (loggerObj: ILoggerDto) => any;
}
appRoot.factory('logFactory', ['$http', 'staticObjects', ($http, staticObjects: IStaticObjects) => {
    var urlBase = staticObjects.apiBaseUrl + 'logging/';
    var logFactory: ILogFactory = {
        log: (loggerObj: ILoggerDto) => $http.post(urlBase + "log", loggerObj)
    };
    return logFactory;
}]); 